import Layout from '@/layout'

const mobileRouter = {
  path: '/mobile',
  component: Layout,
  redirect: 'noRedirect',
  alwaysShow: true,
  name: 'mobile',
  meta: {
    title: '移动端',
    icon: 'example',
    access: 'mobile'
  },
  children: [{
    path: '/mobile/touch',
    name: 'touch',
    component: () =>
      import ('@/views/mobile/touch'),
    redirect: 'noRedirect',
    alwaysShow: true,
    meta: {
      title: '手机触屏端',
      access: 'touch'
    },
    children: [{
      path: '/mobile/touch/basic',
      name: 'touchBasic',
      component: () =>
        import ('@/views/mobile/touch/basic'),
      meta: {
        title: '基础配置',
        access: 'touchBasic'
      }
    },
    {
      path: '/mobile/touch/diy',
      name: 'touchDiy',
      component: () =>
        import ('@/views/mobile/touch/diy'),
      meta: {
        title: '个性化首页',
        access: 'touchDiy'
      }
    },
    {
      path: '/mobile/touch/page',
      name: 'mobileTouchPage',
      component: () =>
        import('@/views/mobile/touch/page/index'),
      meta: {
        title: '页面管理',
        access: 'mobileTouchPage'
      }
    },
    {
      path: '/mobile/touch/page/edit',
      name: 'mobileTouchPageEdit',
      component: () =>
        import('@/views/mobile/touch/page/edit'),
      meta: {
        title: '页面管理',
        access: 'mobileTouchPage',
        activeMenu: '/mobile/touch/page'
      },
      hidden: true
    }
    ]
  }, {
    path: '/mobile/wxminiprogram',
    name: 'wxminiprogram',
    component: () =>
      import ('@/views/mobile/wxminiprogram'),
    redirect: 'noRedirect',
    alwaysShow: true,
    meta: {
      title: '微信小程序',
      access: 'wxminiprogram'
    },
    children: [{
      path: '/mobile/wxminiprogram/basic',
      name: 'wxminiprogramBasic',
      component: () =>
        import ('@/views/mobile/wxminiprogram/basic'),
      meta: {
        title: '基础配置',
        access: 'wxminiprogramBasic'
      }
    }
    ]
  }, {
    path: '/mobile/douyin',
    name: 'douyin',
    component: () =>
      import ('@/views/mobile/douyin'),
    redirect: 'noRedirect',
    alwaysShow: true,
    meta: {
      title: '抖音小程序',
      access: 'dyminiprogram'
    },
    children: [{
      path: '/mobile/douyin/basic',
      name: 'dyminiprogramBasic',
      component: () =>
        import ('@/views/mobile/douyin/basic'),
      meta: {
        title: '基础配置',
        access: 'dyminiprogramBasic'
      }
    }
    ]
  }, {
    path: '/mobile/app',
    name: 'mobileApp',
    component: () =>
      import ('@/views/mobile/app'),
    redirect: 'noRedirect',
    alwaysShow: true,
    meta: {
      title: 'App',
      access: 'mobileApp'
    },
    children: [{
      path: '/mobile/app/basic',
      name: 'mobileAppBasic',
      component: () =>
        import ('@/views/mobile/app/basic'),
      meta: {
        title: '基础配置',
        access: 'mobileAppBasic'
      }
    }
    ]
  }, {
    path: '/mobile/qianfanmag',
    name: 'qianfanmag',
    component: () =>
      import ('@/views/mobile/qianfanmag'),
    redirect: 'noRedirect',
    alwaysShow: true,
    meta: {
      title: '第三方配置',
      access: 'mobileApp'
    },
    children: [{
      path: '/mobile/qianfanmag/basic',
      name: 'mobileAppBasic',
      component: () =>
        import ('@/views/mobile/qianfanmag/basic'),
      meta: {
        title: '基础配置',
        access: 'mobileAppBasic'
      }
    }
    ]
  }]
}
export default mobileRouter
